import App from './App'
// import request from './http/request.js'
import httpApi from './http/index.js'
import store from './store'   
import AuthUtil from '@/util/authUtil.js'
import * as dateFormatUtils from '@/util/dateFormatUtil.js'
// #ifndef VUE3
import Vue from 'vue'
// uViewUI
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)

// Vue.prototype.$http = request
Vue.prototype.$httpApi = httpApi
Vue.prototype.$store = store
Vue.prototype.$authUtil = AuthUtil


Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
    ...App,
	store,
})


Object.keys(dateFormatUtils).forEach(name => {
    Vue.filter(name, dateFormatUtils[name])
})

// 引入请求封装，将app参数传递到配置中
require('./http/request.js')(app)
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif